<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>1.基本指令：模板语法、v-bind、v-on</title>
    <script src="./js/vue.js"></script>
</head>

<body>
    <div id="app">
        <p>{{message}}</p>
        <p v-bind:title="message">v-bind数据绑定</p>
        <button @click="reversemessage">v-on事件监听</button>
    </div>
    <script>
        var app = new Vue({
            el: '#app',
            data: {
                message: '基本指令',
            },
            methods: {
                reversemessage: function () {
                    this.message = this.message.split('').reverse().join('')
                }
            }
        })
    </script>
</body>

</html>